package top.caoayu.base.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.caoayu.base.entity.dto.HomeDTO;

@RestController
@RequestMapping("/home")
public class HomeController {
    @RequestMapping("/index")
    public String index() {
        return "index";
    }

    @PostMapping("/reqBody")
    public String reqBody(@RequestBody HomeDTO home) {
        return home.getPassword();
    }
}
